<div class="bjui-pageHeader">
    <form id="pagerForm" data-toggle="ajaxsearch" action="{:U('index')}" method="post">
        <input type="hidden" name="pageSize" value="${model.pageSize}">
        <input type="hidden" name="pageCurrent" value="${model.pageCurrent}">
        <input type="hidden" name="orderField" value="${param.orderField}">
        <input type="hidden" name="orderDirection" value="${param.orderDirection}">
        <div class="bjui-searchBar">
            
			<a href="{:U('createGroup')}" class="btn btn-green" data-toggle="dialog" data-width="500" data-height="250" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}-添加组">添加组</a>
            <div class="pull-right">
                <div class="btn-group">
                    <button type="button" class="btn-default dropdown-toggle" data-toggle="dropdown" data-icon="copy">
                        复选框-批量操作
                        <span class="caret"></span>
                    </button>
                    <ul class="dropdown-menu right" role="menu">
                        <li>
							<a href="{:U('AuthManager/batchChange?method=batchresume')}" data-toggle="doajaxchecked" data-confirm-msg="确定要启用选中项吗？" data-idname="ids" data-group="ids">启用选中</a>
							<a href="{:U('AuthManager/batchChange?method=batchforbid')}" data-toggle="doajaxchecked" data-confirm-msg="确定要禁用选中项吗？" data-idname="ids" data-group="ids">禁用选中</a>
							<a href="{:U('AuthManager/batchChange?method=batchdelete')}" data-toggle="doajaxchecked" data-confirm-msg="确定要删除选中项吗？" data-idname="ids" data-group="ids">删除选中</a>
                        </li>
                    </ul>
                </div>
            </div>
        </div>
    </form>
</div>
<div class="bjui-pageContent tableContent">
    <table data-toggle="tablefixed" data-width="100%" data-nowrap="true">
        <thead>
            <tr>
				<th width="26">
                    <input type="checkbox" class="checkboxCtrl" data-group="ids" data-toggle="icheck">
                </th>
                <th data-order-field="id">编号</th>
                <th>用户组</th>
                <th>描述</th>
                <th>授权</th>
                <th>状态</th>
                <th>操作</th>
            </tr>
        </thead>
        <tbody>
            <?php if(@$authGroupList)foreach($authGroupList as $arr):?>
            <tr data-id="{$arr.id}">
				<td>
                    <input type="checkbox" name="ids" data-toggle="icheck" value="{$arr.id}">
                </td>
                <td>{$arr.id}</td>
                <td>{$arr.title}</td>
                <td>{$arr.description}</td>
                <td>
                    <a class="btn btn-green"data-toggle="navtab" data-options="{id:'Auth{$arr['id']}', url:'{:U('AuthManager/access?groupId='.$arr['id'])}', title:'{$arr.title}-访问授权'}">访问授权</a>
                    <a class="btn btn-green"data-toggle="navtab" data-options="{id:'AuthAccess{$arr['id']}', url:'{:U('AuthManager/user?groupId='.$arr['id'].'&navTabId=AuthAccess'.$arr['id'])}', title:'{$arr.title}-成员授权'}">成员授权</a>
                    <!--<a href="{:U('AuthManager/category?group_name='.$arr['title'].'&group_id='.$arr['id'])}" class="btn btn-green" data-toggle="dialog" data-width="800" data-height="400" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}">分类授权</a>-->
                    <!--<a href="{:U('AuthManager/user?group_name='.$arr['title'].'&group_id='.$arr['id'])}" class="btn btn-green" data-toggle="dialog" data-width="800" data-height="400" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}">成员授权</a>-->
                </td>
                <td>{$arr.status_text}</td>
                <td>
                    <a href="{:U('AuthManager/editGroup?&id='.$arr['id'])}" class="btn btn-green" data-toggle="dialog" data-width="500" data-height="250" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}-编辑">编辑</a>
                    <?php if($arr['status']):?>
                        <a href="{:U('AuthManager/changeStatus?method=forbidGroup&id='.$arr['id'])}" class="btn btn-red" data-toggle="doajax" data-width="800" data-height="400" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}">禁用</a>
                    <?php else:?>
                        <a href="{:U('AuthManager/changeStatus?method=resumeGroup&id='.$arr['id'])}" class="btn btn-green" data-toggle="doajax" data-width="800" data-height="400" data-id="dialog-normal" data-mask="true" data-title="{$arr.title}">启用</a>
                    <?php endif;?>
                    <a href="{:U('AuthManager/changeStatus?method=deleteGroup&id='.$arr['id'])}" class="btn btn-red" data-toggle="doajax" data-confirm-msg="确定要删除该行信息吗？">删</a>
                    <?php if($arr['id']==C('DEFAULT_GROUP')):?>
                        <a href="{:U('Config/setDefaultConfig?name=DEFAULT_GROUP&value=0')}" class="btn btn-red" data-toggle="doajax">取消默认小组</a>
                    <?php else:?>
                        <a href="{:U('Config/setDefaultConfig?name=DEFAULT_GROUP&value='.$arr['id'])}" class="btn btn-green" data-toggle="doajax">指定默认小组</a>
                    <?php endif;?>
                </td>
            </tr>
            <?php endforeach;?>
        </tbody>
    </table>
</div>